package Tests;

import static org.junit.Assert.*;

import org.junit.Test;

import Accounts.CreditCard;
import Accounts.SavingsAccount;

public class SavingsAccountTest {
	public SavingsAccountTest()
	{
		testSavingsAccount();
		testCalculateInterest();
		testWithdrawal();
		testVerseMoney();
		testPrint();
	}

	@Test
	public void testSavingsAccount() {
		SavingsAccount defaultAccount = new SavingsAccount("Test","test2", "test3", "test4", "test5" );
		assertNotNull("The card object is null", defaultAccount);
	}

	@Test
	public void testCalculateInterest() {
		SavingsAccount defaultAccount = new SavingsAccount("Test","test2", "test3", "test4", "test5" );
		defaultAccount .verseMoney(2000);
		defaultAccount.calculateInterest();
		defaultAccount.print();
	}

	@Test
	public void testWithdrawal() {
		SavingsAccount defaultAccount = new SavingsAccount("Test","test2", "test3", "test4", "test5" );
		defaultAccount.verseMoney(2000);
		assertTrue("not true", defaultAccount.withdrawal(250));
		assertFalse("not false", defaultAccount.withdrawal(2000));
	}

	@Test
	public void testVerseMoney() {
		SavingsAccount defaultAccount = new SavingsAccount("Test","test2", "test3", "test4", "test5" );
		defaultAccount.verseMoney(2000);
		defaultAccount.print();
	}

	@Test
	public void testPrint() {
		SavingsAccount defaultAccount = new SavingsAccount("Test","test2", "test3", "test4", "test5" );
		defaultAccount.print();
	}

}
